package com.lcc.lynx.security.log;

import com.lcc.lynx.security.config.RootProperties;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * Excel处理配置
 *
 * @author lcc
 * @date 2023-10-14 14:15
 */
@Data
@Component
@ConfigurationProperties(prefix = LogProperties.PROPERTIES_PREFIX)
public class LogProperties extends RootProperties {

    public static final String PROPERTIES_PREFIX = ROOT_PREFIX + ".log";

    /**
     * 记录日志排除路径
     */
    private List<String> excludes = List.of("/sys/api/log/*", "/sys/api/data/*");

    public void setExcludes(List<String> excludes) {
        if(excludes != null){
            excludes.addAll(this.excludes);
            this.excludes = excludes;
        }
    }
}
